package chd.edu.train.member.controller.admin;

import chd.edu.train.common.resp.CommonResp;
import chd.edu.train.common.resp.PageResp;
import chd.edu.train.member.req.TicketQueryReq;
import chd.edu.train.member.resp.TicketQueryResp;
import chd.edu.train.member.service.TicketService;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import org.springframework.web.bind.annotation.*;

/**
 * @author Zhang Chaoliang
 * create 2023
 */
@RestController
@RequestMapping("/admin/ticket")
public class TicketAdminController {

    @Resource
    private TicketService ticketService;

    /**
     * 保存信息
     * @param req
     * @return
     */
    @GetMapping("/query-list")
    public CommonResp<PageResp<TicketQueryResp>> queryList(@Valid TicketQueryReq req){
        PageResp<TicketQueryResp> list = ticketService.queryList(req);

        return new CommonResp<>(list);
    }
}
